<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- 数组写法用的很少 -->
		<div id="app">
			
			<!-- 固定写法 -->
			<h2 class="title" :class="['active','line']">{{message}}</h2>
			<!-- 用data属性来写 -->
			<h2 class="title" :class="[active,line]">{{message}}</h2>
			<!-- 用函数来写 -->
			<h2 class="title" :class="getClasses()">{{message}}</h2>
		</div>
	</body>
	<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript"> 
		const app = new Vue({
			el: "#app",
			data: {
				message : "你好",
				active: "aaaa",
				line : "bbbb"
			},
			methods:{
				getClasses: function(){
					return [this.active,this.line]
				}
			}
		})
	</script>
</html>
